package com.entrogy.service.impl;

import com.entrogy.bean.SchoolRoute;
import com.entrogy.dao.SchoolRouteMapper;
import com.entrogy.service.SchoolRouteService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**校车线路Service接口 实现类
 * @Author 许红松
 * @date 2019/5/10 0010 下午 2:15
 */
@Service("shoolRouteService")
public class SchoolRouteServiceImpl  implements SchoolRouteService {

    @Autowired
    private SchoolRouteMapper schoolRouteMapper;//校车线路dao接口

    /**
     * 新增校车线路
     * @param schoolRoute
     * @return
     */
    @Override
    public  int addSchoolRoute(SchoolRoute schoolRoute){
        return schoolRouteMapper.addSchoolRoute(schoolRoute);
    };

    /**
     * 修改校车线路
     * @param map
     * @return
     */
    @Override
    public  int  updateSchoolRoute(Map<String,Object> map){
        return schoolRouteMapper.updateSchoolRoute(map);
    };

    /**
     *  删除校车线路
     * @param Routeid
     * @return
     */
    @Override
    public  int deleteSchoolRoute(@Param("Routeid") int Routeid){
        return schoolRouteMapper.deleteSchoolRoute(Routeid);
    };

    /**
     *   获取校车线路List
     * @param map
     * @return
     */
    @Override
    public List<Map<String,Object>> getSchoolRouteList(Map<String,Object> map){
        return schoolRouteMapper.getSchoolRouteList(map);
    };
}
